﻿namespace System.Dns.Toolkit.DnsServer {
    public interface IMessageDispatcher {

        /// <summary>
        /// Subscribe core to Typed message
        /// </summary>
        void Subscribe(ICore core, Type type);

        /// <summary>
        /// Publish messages to dispatcher
        /// </summary>
        /// <typeparam name="T"></typeparam>
        /// <param name="message"></param>
        bool Publish<T>(T message);

    }

}